-
Notifications
You must be signed in to change notification settings - Fork 846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add augur api start
and augur collection start
commands
#2681
Conversation
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
pylint
augur/application/cli/collection.py|235 col 23| W0621: Redefining name 'logger' from outer scope (line 28) (redefined-outer-name)
augur/application/cli/collection.py|247| C0116: Missing function or method docstring (missing-function-docstring)
augur/application/cli/collection.py|247 col 34| W0621: Redefining name 'logger' from outer scope (line 28) (redefined-outer-name)
augur/application/cli/collection.py|261| C0116: Missing function or method docstring (missing-function-docstring)
augur/application/cli/collection.py|293| C0116: Missing function or method docstring (missing-function-docstring)
@@ -0,0 +1,69 @@ | |||
import resource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
C0114: Missing module docstring (missing-module-docstring)
redis_connection.flushdb() | ||
|
||
|
||
def clear_rabbitmq_messages(connection_string, queues, logger): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
C0116: Missing function or method docstring (missing-function-docstring)
#virtual_host_string = connection_string.split("/")[-1] | ||
|
||
logger.info("Clearing all messages from celery queue in rabbitmq") | ||
from augur.tasks.init.celery_app import celery_app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
C0415: Import outside toplevel (augur.tasks.init.celery_app.celery_app) (import-outside-toplevel)
clear_message_queues(connection_string, queues) | ||
|
||
|
||
def clear_message_queues(connection_string, queues): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
C0116: Missing function or method docstring (missing-function-docstring)
return | ||
|
||
# if the requested amount is greater than the hard limit then set the hard limit to the num_files value | ||
if current_hard <= num_files: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
R1731: Consider using 'current_hard = max(current_hard, num_files)' instead of unnecessary if block (consider-using-max-builtin)
""" | ||
Sends SIGTERM to all Augur server & worker processes | ||
""" | ||
logger = logging.getLogger("augur.cli") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
W0621: Redefining name 'logger' from outer scope (line 28) (redefined-outer-name)
""" | ||
Sends SIGKILL to all Augur server & worker processes | ||
""" | ||
logger = logging.getLogger("augur.cli") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
W0621: Redefining name 'logger' from outer scope (line 28) (redefined-outer-name)
for process in augur_processes: | ||
logger.info(f"Found process {process.pid}") | ||
|
||
def get_augur_collection_processes(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
C0116: Missing function or method docstring (missing-function-docstring)
pass | ||
return augur_processes | ||
|
||
def is_collection_process(process): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
C0116: Missing function or method docstring (missing-function-docstring)
return False | ||
|
||
|
||
def augur_stop(signal, logger): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
W0621: Redefining name 'signal' from outer scope (line 12) (redefined-outer-name)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This kind of change will require some pretty extensive devops testing before release.
return False | ||
|
||
|
||
def augur_stop(signal, logger): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
W0621: Redefining name 'logger' from outer scope (line 28) (redefined-outer-name)
|
||
cleanup_after_collection_halt(logger) | ||
|
||
def cleanup_after_collection_halt(logger): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
C0116: Missing function or method docstring (missing-function-docstring)
|
||
cleanup_after_collection_halt(logger) | ||
|
||
def cleanup_after_collection_halt(logger): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
W0621: Redefining name 'logger' from outer scope (line 28) (redefined-outer-name)
clear_redis_caches(logger) | ||
|
||
#Make sure that database reflects collection status when processes are killed/stopped. | ||
def clean_collection_status(session): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
C0116: Missing function or method docstring (missing-function-docstring)
""")) | ||
#TODO: write timestamp for currently running repos. | ||
|
||
def assign_orphan_repos_to_default_user(session): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
C0116: Missing function or method docstring (missing-function-docstring)
Signed-off-by: Ulincsys <[email protected]>
Description
Signed commits